package chapter01;

public class Test21_Array {
    public static void main(String[] args) {
        //定义数组
        int[] a;
        a = new int[20];
        //声明加定义
        double[] b = new double[10];
        //数组的length属性
        System.out.println(a.length);
        System.out.println(b.length);
        boolean[] c = new boolean[5];
        System.out.println(a[0]);
        System.out.println(b[0]);
        System.out.println(c[0]);
        //数组越界
        //System.out.println(a[20]);
        //数组赋值
        int[] d = {1,2,3,4};
        int[] e = new int[]{1,2,3,4};
    }
}
